<?php if(isset($this->category['categoryName'])) { ?>
<h1 class="body-box-title" id="photo-thumbs-category" name="<?php echo $this->category['categoryID']; ?>">Album: <?php echo $this->category['categoryName']; ?></h1>
<p>The <strong><?php echo $this->category['categoryName']; ?></strong> was created <?php echo date('Y-m-d',$this->category['categoryCreated']); ?>.
Last update at <strong><?php echo date('Y-m-d',$this->category['categoryUpdated']); ?></strong>.
Now it have <strong><?php echo $this->category['categoryCounts']; ?></strong> photos.</p>
<?php } else { ?>
<h1 class="body-box-title" id="photo-thumbs-category" name="0">My Photos</h1>
<p>You have uploaded <strong><?php echo $this->recordCount; ?></strong> photos.</p>
<?php } ?>
<?php if(count($this->photos)) { ?>
<?php foreach($this->photos as $p) { $src = $p['userID'] . '/' . date('Ym', $p['photoCreated']) . '/120x80/' . $p['photoID'] . '.png'; ?>
<div id="photo-box-<?php echo $p['photoID']; ?>" class="user-thumb-photo-box fl vb">
	<a href="/photo/<?php echo $p['photoID']; ?>.png" target="_blank" title="<?php echo $p['photoName']; ?>"><img id="photo-thumb-<?php echo $p['photoID']; ?>" alt="<?php echo $p['photoDesc']; ?>" src="<?php echo $this->photoDomain . $src; ?>"></a>
	<div class="option-photo-box">
		<a href="<?php echo $this->url(array('action' => 'delete', 'controller' => 'photo', 'module' => 'home', 'photo_id' => $p['photoID']), null, true); ?>" target="<?php echo $p['photoID']; ?>" title="<?php echo $p['photoTitle']; ?>" class="delete-photo-link fr">Delete</a>
		<a href="#" target="<?php echo $p['photoID']; ?>" name="<?php echo $p['categoryID']; ?>" title="<?php echo $p['photoTitle']; ?>" class="edit-photo-link">Edit</a>
		<div class="cr"></div>
	</div>
</div>
<?php } ?>
<div class="cl"></div>
<?php echo $this->render('pages.phtml'); ?>
<div id="edit-photo-box" class="edit-photo-lightbox">
<form method="post" id="edit-photo-form" action="<?php echo $this->url(array('action' => 'edited', 'controller' => 'photo', 'module' => 'home'), null, true); ?>">
	<div class="edit-photo-box-row">
		<label for="category">Change Photo Category</label>
		<select size="1" id="photo-category-list">
			<?php foreach($this->categories as $c) { ?>
			<option value="<?php echo $c['categoryID']; ?>"><?php echo $c['categoryName']; ?></option>
			<?php } ?>
		</select>
	</div>
	<div class="edit-photo-box-row">
		<label for="title">Change Photo Title</label>
		<input type="text" id="edit-photo-title" class="edit-photo-input" name="title" size="40" />
	</div>
	<div class="edit-photo-box-row">
		<label for="desc">Change Photo Description</label>
		<textarea rows="5" cols="40" id="edit-photo-desc" name="desc"></textarea>
	</div>
	<div class="edit-photo-box-row">
		<input type="hidden" name="photo-id" id="edito-photo-id" value="0" />
		<input type="hidden" name="category-id" id="edito-category-id" value="0" />
		<input type="submit" value="Save The Photo" />
	</div>
</form>
</div>
<?php } ?>